package com.coursehub.exercise.entity;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 题目实体类
 */
@Getter
@Setter
@Entity
@Table(name = "question")
@NoArgsConstructor
@AllArgsConstructor
public class Question {
    
    @Id
    @Column(name = "question_id", nullable = false, length = 100)
    private String questionId;

    @Column(name = "question_score", nullable = false)
    private Integer questionScore;

    @Column(name = "type", nullable = false)
    private Integer type; // 0表示选择题 1表示主观题

    @Column(name = "question_content", nullable = false, length = 1000)
    private String questionContent;

    @Column(name = "question_answer", nullable = false, length = 1000)
    private String questionAnswer;

    public Question(String questionId) {
        this.questionId = questionId;
    }
}